package com.mk.springboot.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.mk.springboot.pojo.Category;
import com.mk.springboot.vo.CategoryPlateVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface CategoryMapper extends BaseMapper<Category> {

//    @Select("SELECT category.*, plate.`name` as `plateName` FROM category,plate WHERE category.plate_id=plate.id and category.name = #{name} and category.plate_id = #{plate_id}")
    List<CategoryPlateVO> getCategoryPlate(Page<CategoryPlateVO> page, @Param("name") String name, @Param("plateId") Integer plateId);
}
